﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Service.Model.Map
{
    public class LearningWeightMap : EntityTypeConfiguration<LearningWeight>
    {
        public LearningWeightMap()
        {
            ToTable("dbo.LearningWeight");
            HasKey(o => o.LearningWeightId);

            Property(o => o.LearningWeightId).HasColumnName("LearningWeightId").IsRequired().HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            Property(o => o.WeightPieceValue).HasColumnName("PieceValue").IsRequired();
            Property(o => o.WeightMobility).HasColumnName("Mobility").IsRequired();
            Property(o => o.WeightCoordinationPiece).HasColumnName("CoordinationPiece").IsRequired();
            Property(o => o.WeightPawnAdvancement).HasColumnName("PawnAdvancement").IsRequired();
            Property(o => o.WeightDiagonalsAndFiles).HasColumnName("DiagonalsAndFiles").IsRequired();
        }
    }
}